import 'package:nyh_motorcade_app/entity/company_entity.dart';

companyEntityFromJson(CompanyEntity data, Map<String, dynamic> json) {
	if (json['id'] != null) {
		data.id = json['id'].toString();
	}
	if (json['name'] != null) {
		data.name = json['name'].toString();
	}
	if (json['code'] != null) {
		data.code = json['code'].toString();
	}
	if (json['isPrepaid'] != null) {
		data.isPrepaid = json['isPrepaid'];
	}
	if (json['isNotSettlement'] != null) {
		data.isNotSettlement = json['isNotSettlement'];
	}
	return data;
}

Map<String, dynamic> companyEntityToJson(CompanyEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['id'] = entity.id;
	data['name'] = entity.name;
	data['code'] = entity.code;
	data['isPrepaid'] = entity.isPrepaid;
	data['isNotSettlement'] = entity.isNotSettlement;
	return data;
}